<%-- 
    Document   : BillTourCanceled
    Created on : Nov 1, 2011, 11:23:09 PM
    Author     : MrKoi
--%>

<%@page import="DAL.TourBookingBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>East2West Tours and Travels</title>
    </head>
    <%
    String username="";
    if(session.getAttribute("User")!=null) {
        username=session.getAttribute("User").toString();
        TourBookingBean tc=new TourBookingBean();
        Collection coll=tc.getBillCancelTour(username);
        request.setAttribute("tc",coll);
    } else {
        out.println("<script>alert('Please login before view bills of the tour !');window.location='index.jsp';</script>");
        
    }
    %>
    <body>
        <center>   <span style="font-size: 20px;color: #343434;">Bills cancel tours</span>
            <table cellspacing="3" border="1"  align="center" style="border:1px solid #ccc; font-family:Arial, Helvetica, sans-serif; font-size: 11px;text-align:center;" width="510px">
                <thead>                   
                    <tr bgcolor="#CCCCCC" align="center">            
                        
                        <td><b>User name</b></td>
                        <td><b>Tour name</b></td>    
                        <td><b>Number of Child</b></td>
                        <td><b>Number of Adult</b></td>
                        <td><b>Total of guest</b></td>                       
                        <td><b>Total money (USD)</b></td>
                        <td><b>Refund money (USD)</b></td>
                        <td><b>Date Cancel</b></td> 
                        <td><b>View more</b></td>
                        
                    </tr>
                </thead>
                <tbody>
                    
                    
                    <c:forEach items="${tc}" var="tp">        
                        <tr>      	
                            <td>${tp.userName}</td>                  
                            <td>${tp.typeTour}</td>                           
                            <td>${tp.numberOfChild}</td>
                            <td>${tp.numberOfAdult}</td>
                            <td>${tp.totalOfGuest}</td>                           
                            <td><f:formatNumber value="${tp.totalMoney}" pattern="$#,###"/></td>
                            <td><f:formatNumber value="${tp.refundMoney}" pattern="$#,###"/></td>                           
                            <td>${tp.dateCancel}</td>                         
                            
                            <td>
                            <form action="ControllerViewTourCanceled" method="post">
                                <input name="tourId" value="${tp.tourId}" type="hidden"/>
                                <input name="typeTour" value="${tp.typeTour}" type="hidden"/>
                                <input name="numberOfChild" value="${tp.numberOfChild}" type="hidden"/>
                                <input name="numberOfAdult" value="${tp.numberOfAdult}" type="hidden"/>
                                <input name="totalOfGuest" value="${tp.totalOfGuest}" type="hidden"/>
                                <input name="totalMoney" value="${tp.totalMoney}" type="hidden"/>
                                <input name="startDate" value="${tp.startDate}" type="hidden"/>
                                <input name="endDate" value="${tp.endDate}" type="hidden"/>
                                <input name="dateBooking" value="${tp.dateBooking}" type="hidden"/>
                                <input name="cash" value="${tp.cash}" type="hidden"/>
                                <input name="dateCancel" value="${tp.dateCancel}" type="hidden"/>
                                <input name="refundMoney" value="${tp.refundMoney}" type="hidden"/>
                                <input type="submit" value="View more" name="submit" style="border:none;width:70px;font-weight:bold;font-size:12px;background-image:url(skinImgTuor/btnSmall.jpg);color: #fff;"/>
                                
                            </form>
                        </tr>
                        
                    </c:forEach>                 
                    
                    
                </tbody>
            </table>
            
            <br/>
            
            <a href="index.jsp">Back home Page</a>
        </center>        
        
    </body>
</html>
